package com.test;

import java.lang.reflect.Method;

import com.pccw.hessian.support.client.TaskExecuteListener;

public class CRMDefaultTaskListener<R,E extends Throwable> implements TaskExecuteListener<R,E>{

	@Override
	public void onPerExecute(Method method, Object[] args) {
		System.out.println("执行初始化");
	}

	@Override
	public void onExceptionOccured(Method method, Object[] args,Throwable exception) {
		System.out.print("发生异常：");exception.printStackTrace();
	}

	@Override
	public void onExecuteSuccess(Method method, Object[] args, R result) {
		System.out.println("任务执行成功："+result);
	}

	@Override
	public void onFinally(Method method, Object[] args, R result) {
		System.out.println("任务执行收尾");
	}

}
